//
//  XVCProjectMainUse.m
//  ppkc2016
//
//  Created by 拼凑的断音 on 16/5/11.
//  Copyright © 2016年 拼凑的断音. All rights reserved.
//

#import "XVCProjectMainUse.h"
#import "SideBarViewController.h"
#import "indexViewController.h"
#import "PresentProjectMainCotroller.h"
#import "XXTool.h"

@implementation XVCProjectMainUse

+(WWSideslipViewController*)shareProjectMain
{
    static WWSideslipViewController *instance;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[self alloc] init];
        PresentProjectMainCotroller *use = [[PresentProjectMainCotroller alloc] init];
        
        SideBarViewController *leftBar = [[SideBarViewController alloc] init];
        leftBar.delegate = use;
        
        use.main = [[MainViewController alloc] initWithRootViewController:[[indexViewController alloc] init]];
        
        instance = [[WWSideslipViewController alloc] initWithLeftView:leftBar
                                                                                andMainView:use.main
                                                                               andRightView:nil
                                                                         andBackgroundImage:[XXTool createImageWithColor:[UIColor colorWithRed:38/225.0 green:38/225.0 blue:38/255.0 alpha:1.0]]];
        instance.sideslipTapGes.enabled = YES;

    });
    return instance;
}

@end
